WISH-440 Reset ProvDon When Matched Deposit Deletion Requested#235
Merged
coding-jjun merged 1 commit intomainfrom Feb 6, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 변경 사항
이번 PR에서는 후원 삭제 프로세스 개선 및 예비후원(Provisional Donation) 상태 관리를 추가하였습니다.
후원 삭제 시 예비후원 상태 초기화 추가
DepositDeleteSaga.handleMatchedDepositDeleteRequested()내에서 예비후원의 매치를 취소하는 로직을 추가하였으며, 실패 시 적절한 보상 조치(관리자 알림 발송)를 수행합니다.예비후원 매치 취소 실패 처리
cancelMatchProvDon.execute()호출 시InvalidStatus예외가 발생하면 관리자에게 알림을 보내도록 보상 조치를 추가했습니다.E2E 테스트 업데이트
Deposit API E2E Test에서 후원 삭제 후 예비후원의 상태가Pending으로 변경되는지를 검증하는 테스트 케이스를 추가했습니다.Mock 데이터 생성 개선
createMockFundingWithRelations()함수에서provisional donation을 생성할 때,senderSig값을 적절히 설정하도록 수정했습니다.📌 주요 변경 파일
src/event-handlers/deposit-delete.saga.tssrc/features/deposit/deposit.e2e.spec.tssrc/tests/mock-factory.ts✅ 검토 포인트
Pending으로 초기화하는 방식이 적절한지InvalidStatus예외 발생 시 관리자 알림 처리가 적절한지🚀 기대 효과
Deposit을 두 번 삭제 시도합니다. 그 이유는 Donation 삭제 성공 이벤트 핸들러에서 한 번, ProvDon 리셋 성공 이벤트 핸들러에서 한 번. 하지만 결과적으로 Eventual Consistency를 만족시키니까, 내비두어야 할까요?
리뷰 부탁드립니다! 🙌